/* 智能车间管控大屏样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

.dashboard-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

/* 头部标题区域 */
.header {
    height: 80px;
    background: linear-gradient(90deg, rgba(0,255,255,0.1) 0%, rgba(0,255,255,0.3) 50%, rgba(0,255,255,0.1) 100%);
    border-bottom: 2px solid #00ffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #00ffff 20%, #00ffff 80%, transparent 100%);
    opacity: 0.1;
}

.header-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0,255,255,0.8);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.header-time {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #00ffff;
    z-index: 1;
}

/* 主内容区域 */
.main-content {
    height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    padding: 15px;
}

/* 卡片通用样式 */
.card {
    background: linear-gradient(135deg, rgba(0,255,255,0.1) 0%, rgba(0,255,255,0.05) 100%);
    border: 1px solid rgba(0,255,255,0.3);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #00ffff 50%, transparent 100%);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card-title {
    font-size: 18px;
    color: #00ffff;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
}

/* 左侧列 */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 不良品率统计 */
.defective-stats {
    flex: 1;
}

.defective-rate {
    font-size: 48px;
    font-weight: bold;
    color: #ff6b6b;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255,107,107,0.8);
}

.defective-detail {
    font-size: 24px;
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 10px;
}

/* 员工绩效Top5 */
.employee-performance {
    flex: 1;
}

.performance-chart {
    height: 250px;
    position: relative;
}

.performance-bar {
    display: flex;
    align-items: end;
    height: 100%;
    justify-content: space-around;
    padding: 20px 0;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    margin: 0 5px;
}

.bar {
    width: 30px;
    background: linear-gradient(180deg, #00ffff 0%, #0080ff 100%);
    margin-bottom: 10px;
    border-radius: 3px;
    position: relative;
    animation: growUp 1s ease-out;
}

@keyframes growUp {
    from { height: 0; }
    to { height: var(--bar-height); }
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #00ffff;
    white-space: nowrap;
}

.bar-label {
    font-size: 12px;
    color: #ffffff;
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* 中间列 */
.middle-column {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 15px;
}

/* 产量统计表格 */
.production-table-container {
    background: linear-gradient(135deg, rgba(0,255,255,0.1) 0%, rgba(0,255,255,0.05) 100%);
    border: 1px solid rgba(0,255,255,0.3);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.production-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
}

.production-table th,
.production-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(0,255,255,0.2);
}

.production-table th {
    background: rgba(0,255,255,0.2);
    color: #00ffff;
    font-weight: bold;
}

.production-table tbody tr:hover {
    background: rgba(0,255,255,0.1);
}

/* 仪表盘区域 */
.dashboard-gauges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge {
    width: 150px;
    height: 150px;
    position: relative;
    margin-bottom: 10px;
}

.gauge-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #333 0deg, #333 var(--progress), transparent var(--progress));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-fill {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00ffff 0deg, #0080ff var(--progress), transparent var(--progress));
    position: absolute;
    top: 0;
    left: 0;
}

.gauge-center {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: #0a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.gauge-value {
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
}

.gauge-label {
    font-size: 14px;
    color: #ffffff;
    margin-top: 5px;
    text-align: center;
}

/* 右侧列 */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0,255,255,0.1) 0%, rgba(0,255,255,0.05) 100%);
    border: 1px solid rgba(0,255,255,0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #00ffff;
}

/* 工序报工数据Top5 */
.process-report-top5 {
    flex: 1;
}

.process-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 12px;
}

.process-table th,
.process-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid rgba(0,255,255,0.2);
}

.process-table th {
    background: rgba(0,255,255,0.2);
    color: #00ffff;
    font-weight: bold;
}

.process-table tbody tr:hover {
    background: rgba(0,255,255,0.1);
}

/* 工序报工数据Top5 */
.defective-rank {
    flex: 1;
}

.rank-list {
    max-height: 300px;
    overflow-y: auto;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background: rgba(0,255,255,0.05);
    border-radius: 5px;
    border-left: 3px solid #00ffff;
}

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #00ffff;
    color: #0a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rank-info {
    flex: 1;
    margin-left: 15px;
}

.rank-name {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 2px;
}

.rank-code {
    font-size: 12px;
    color: #00ffff;
}

.rank-value {
    text-align: right;
}

.rank-quantity {
    font-size: 16px;
    font-weight: bold;
    color: #ff6b6b;
}

.rank-percentage {
    font-size: 12px;
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .header-title {
        font-size: 28px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .defective-rate {
        font-size: 36px;
    }
    
    .defective-detail {
        font-size: 20px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .dashboard-gauges {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0,255,255,0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,255,255,0.7);
} 